package com.xltt.vehicleControl.bean;


/**
 * 用户的实体类
 * 具体数据如下样例如下
 * {
 * "expiresIn":7200,
 * "deviceType":"android",
 * "idToken":"",
 * "resultCode":"0",
 * "alias":"",
 * "sessionId":null,
 * "accessToken":"eyJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiIxNDg5MDAwMiIsImNsaWVudElkIjoiYnJvd3NlciIsImFwcElkIjoicHJvdG9ubGlua18wMSIsImV4cCI6MTYxNzc2MTE3OSwiZW52IjoidGVzdGluZyJ9.2kzzLMz2CnTCqqTVnfs2pcsmIhaz8ZbOTPbfMsEdeSE",
 * "tcToken":"",
 * "resultMessage":"Success",
 * "userId":"14890002",
 * "refreshToken":"OUU2OEIyMzhBQ0MyNTgyMUJFQzFBNEVDNUY3MjZBMTM="
 * }
 */
public class UserResponse extends BaseResponse {
    /**
     * 过期时间
     */
    private int expiresIn;

    /**
     * 设备类型
     */
    //TODO 需找TSP端确认此参数是否需要进行更改，更改成鸿蒙类型或者手表类型
    private String deviceType;

    private String idToken;

    private String resultCode;

    private String alias;

    private String sessionId;

    private String accessToken;

    private String tcToken;

    private String resultMessage;

    private String userId;

    private String refreshToken;

    private String clientId;

    public int getExpiresIn() {
        return expiresIn;
    }

    public void setExpiresIn(int expiresIn) {
        this.expiresIn = expiresIn;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getIdToken() {
        return idToken;
    }

    public void setIdToken(String idToken) {
        this.idToken = idToken;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public String getTcToken() {
        return tcToken;
    }

    public void setTcToken(String tcToken) {
        this.tcToken = tcToken;
    }

    public String getResultMessage() {
        return resultMessage;
    }

    public void setResultMessage(String resultMessage) {
        this.resultMessage = resultMessage;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getRefreshToken() {
        return refreshToken;
    }

    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }

    public static void save(UserResponse userResponse) {
        if (userResponse != null) {
        //    SharedPreferencesManager.saveUser(GsonUtils.get().toJson(user));
        } else {
          //  SharedPreferencesManager.clearUser();
        }
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getToken() {
        return accessToken;
    }

}
